package ssq.gamest.game;

import java.util.Collections;
import java.util.List;
import org.eclipse.xtext.xbase.lib.CollectionLiterals;
import org.eclipse.xtext.xbase.lib.InputOutput;
import org.junit.Test;
import ssq.gamest.game.Color;
import ssq.gamest.game.Guandan.patterns.三带对;
import ssq.gamest.game.Guandan.patterns.三张;
import ssq.gamest.game.Guandan.patterns.三顺;
import ssq.gamest.game.Guandan.patterns.单张;
import ssq.gamest.game.Guandan.patterns.同花顺;
import ssq.gamest.game.Guandan.patterns.对子;
import ssq.gamest.game.Guandan.patterns.炸弹4;
import ssq.gamest.game.Guandan.patterns.炸弹5;
import ssq.gamest.game.Guandan.patterns.炸弹6;
import ssq.gamest.game.Guandan.patterns.王炸;
import ssq.gamest.game.Guandan.patterns.连对;
import ssq.gamest.game.Guandan.patterns.顺子;
import ssq.gamest.game.Poker;
import ssq.gamest.game.PokerCard;
import ssq.gamest.game.PokerCardGroup;
import ssq.gamest.game.PokerOrderSettings;
import ssq.gamest.game.PokerPattern;
import ssq.gamest.game.Shengji.patterns.主;
import ssq.gamest.game.Shengji.patterns.主对;
import ssq.gamest.game.Shengji.patterns.主拖拉机;
import ssq.gamest.game.Shengji.patterns.主点;
import ssq.gamest.game.Shengji.patterns.主点对;
import ssq.gamest.game.Shengji.patterns.副;
import ssq.gamest.game.Shengji.patterns.副主点;
import ssq.gamest.game.Shengji.patterns.副主点对;
import ssq.gamest.game.Shengji.patterns.副对;
import ssq.gamest.game.Shengji.patterns.副拖拉机;
import ssq.gamest.game.TexasPoker.patterns.同花;
import ssq.utils.Pair;

@SuppressWarnings("all")
public class PokerCardGroupTest {
  /**
   * 掼蛋, 打10
   */
  @Test
  public void testGuandan() {
    Poker poker = new Poker("掼蛋", "Guandan");
    PokerOrderSettings settings = new PokerOrderSettings(Collections.<Integer>unmodifiableList(CollectionLiterals.<Integer>newArrayList(Integer.valueOf(2), Integer.valueOf(3), Integer.valueOf(4), Integer.valueOf(5), Integer.valueOf(6), Integer.valueOf(7), Integer.valueOf(8), Integer.valueOf(9), Integer.valueOf(11), Integer.valueOf(12), Integer.valueOf(13), Integer.valueOf(1), Integer.valueOf(10), Integer.valueOf(14), Integer.valueOf(15))), Collections.<Color>unmodifiableList(CollectionLiterals.<Color>newArrayList(Color.diamonds, Color.clubs, Color.hearts, Color.spades, Color.none)), false, poker);
    settings.setTwoEndian(Collections.<Integer>unmodifiableList(CollectionLiterals.<Integer>newArrayList(Integer.valueOf(1))));
    settings.setPatternAndOrder(Collections.<List<String>>unmodifiableList(CollectionLiterals.<List<String>>newArrayList(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("`others`", "炸弹4", "炸弹5", "同花顺", "炸弹6", "王炸")), Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("对子")))));
    poker.settings = settings;
    PokerCard _pokerCard = new PokerCard(6, Color.diamonds, poker);
    PokerCard _pokerCard_1 = new PokerCard(7, Color.diamonds, poker);
    PokerCard _pokerCard_2 = new PokerCard(8, Color.diamonds, poker);
    PokerCard _pokerCard_3 = new PokerCard(9, Color.diamonds, poker);
    PokerCard _pokerCard_4 = new PokerCard(11, Color.diamonds, poker);
    PokerCardGroup tmpGroup = new PokerCardGroup(poker, _pokerCard, _pokerCard_1, _pokerCard_2, _pokerCard_3, _pokerCard_4);
    单张 _单张 = new 单张();
    List<Pair<PokerPattern, PokerCardGroup>> _match = _单张.match(tmpGroup);
    int _size = _match.size();
    InputOutput.<Integer>println(Integer.valueOf(_size));
    对子 _对子 = new 对子();
    List<Pair<PokerPattern, PokerCardGroup>> _match_1 = _对子.match(tmpGroup);
    int _size_1 = _match_1.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_1));
    三张 _三张 = new 三张();
    List<Pair<PokerPattern, PokerCardGroup>> _match_2 = _三张.match(tmpGroup);
    int _size_2 = _match_2.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_2));
    三带对 _三带对 = new 三带对();
    List<Pair<PokerPattern, PokerCardGroup>> _match_3 = _三带对.match(tmpGroup);
    int _size_3 = _match_3.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_3));
    顺子 _顺子 = new 顺子();
    List<Pair<PokerPattern, PokerCardGroup>> _match_4 = _顺子.match(tmpGroup);
    int _size_4 = _match_4.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_4));
    连对 _连对 = new 连对();
    List<Pair<PokerPattern, PokerCardGroup>> _match_5 = _连对.match(tmpGroup);
    int _size_5 = _match_5.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_5));
    三顺 _三顺 = new 三顺();
    List<Pair<PokerPattern, PokerCardGroup>> _match_6 = _三顺.match(tmpGroup);
    int _size_6 = _match_6.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_6));
    同花顺 _同花顺 = new 同花顺();
    List<Pair<PokerPattern, PokerCardGroup>> _match_7 = _同花顺.match(tmpGroup);
    int _size_7 = _match_7.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_7));
    炸弹4 _炸弹4 = new 炸弹4();
    List<Pair<PokerPattern, PokerCardGroup>> _match_8 = _炸弹4.match(tmpGroup);
    int _size_8 = _match_8.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_8));
    炸弹5 _炸弹5 = new 炸弹5();
    List<Pair<PokerPattern, PokerCardGroup>> _match_9 = _炸弹5.match(tmpGroup);
    int _size_9 = _match_9.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_9));
    炸弹6 _炸弹6 = new 炸弹6();
    List<Pair<PokerPattern, PokerCardGroup>> _match_10 = _炸弹6.match(tmpGroup);
    int _size_10 = _match_10.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_10));
    王炸 _王炸 = new 王炸();
    List<Pair<PokerPattern, PokerCardGroup>> _match_11 = _王炸.match(tmpGroup);
    int _size_11 = _match_11.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_11));
  }
  
  /**
   * 升级, 打10, 黑桃
   */
  @Test
  public void testTexasPoker() {
    Poker poker = new Poker("德州扑克", "TexasPoker");
    PokerOrderSettings settings = new PokerOrderSettings(Collections.<Integer>unmodifiableList(CollectionLiterals.<Integer>newArrayList(Integer.valueOf(2), Integer.valueOf(3), Integer.valueOf(4), Integer.valueOf(5), Integer.valueOf(6), Integer.valueOf(7), Integer.valueOf(8), Integer.valueOf(9), Integer.valueOf(10), Integer.valueOf(11), Integer.valueOf(12), Integer.valueOf(13), Integer.valueOf(1), Integer.valueOf(14), Integer.valueOf(15))), Collections.<Color>unmodifiableList(CollectionLiterals.<Color>newArrayList(Color.diamonds, Color.clubs, Color.hearts, Color.spades, Color.none)), true, poker);
    settings.setPatternAndOrder(Collections.<List<String>>unmodifiableList(CollectionLiterals.<List<String>>newArrayList(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("高牌", "对子", "两对", "三条", "顺子", "同花", "葫芦", "四条", "同花顺")))));
    settings.setTwoEndian(Collections.<Integer>unmodifiableList(CollectionLiterals.<Integer>newArrayList(Integer.valueOf(1))));
    poker.settings = settings;
    PokerCard _pokerCard = new PokerCard(12, Color.diamonds, poker);
    PokerCard _pokerCard_1 = new PokerCard(11, Color.diamonds, poker);
    PokerCard _pokerCard_2 = new PokerCard(11, Color.diamonds, poker);
    PokerCard _pokerCard_3 = new PokerCard(10, Color.diamonds, poker);
    PokerCard _pokerCard_4 = new PokerCard(10, Color.diamonds, poker);
    PokerCardGroup tmpGroup = new PokerCardGroup(poker, _pokerCard, _pokerCard_1, _pokerCard_2, _pokerCard_3, _pokerCard_4);
    同花 _同花 = new 同花();
    List<Pair<PokerPattern, PokerCardGroup>> _match = _同花.match(tmpGroup);
    int _size = _match.size();
    InputOutput.<Integer>println(Integer.valueOf(_size));
  }
  
  /**
   * 升级, 打10, 黑桃
   */
  @Test
  public void testShengji() {
    Poker poker = new Poker("升级", "Shengji");
    PokerOrderSettings settings = new PokerOrderSettings(Collections.<Integer>unmodifiableList(CollectionLiterals.<Integer>newArrayList(Integer.valueOf(2), Integer.valueOf(3), Integer.valueOf(4), Integer.valueOf(5), Integer.valueOf(6), Integer.valueOf(7), Integer.valueOf(8), Integer.valueOf(9), Integer.valueOf(10), Integer.valueOf(11), Integer.valueOf(12), Integer.valueOf(13), Integer.valueOf(1), Integer.valueOf(14), Integer.valueOf(15))), Collections.<Color>unmodifiableList(CollectionLiterals.<Color>newArrayList(Color.diamonds, Color.clubs, Color.hearts, Color.spades, Color.none)), true, poker);
    settings.someColors = Collections.<Color>unmodifiableList(CollectionLiterals.<Color>newArrayList(Color.spades));
    settings.somePoints = Collections.<Integer>unmodifiableList(CollectionLiterals.<Integer>newArrayList(Integer.valueOf(10)));
    settings.setPatternAndOrder(Collections.<List<String>>unmodifiableList(CollectionLiterals.<List<String>>newArrayList(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("副", "主", "副主点", "主点")), Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("副对", "主对", "副主点对", "主点对")), Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("副拖拉机", "主拖拉机")))));
    poker.settings = settings;
    PokerCard _pokerCard = new PokerCard(10, Color.diamonds, poker);
    PokerCard _pokerCard_1 = new PokerCard(10, Color.diamonds, poker);
    PokerCard _pokerCard_2 = new PokerCard(12, Color.diamonds, poker);
    PokerCard _pokerCard_3 = new PokerCard(12, Color.diamonds, poker);
    PokerCard _pokerCard_4 = new PokerCard(11, Color.diamonds, poker);
    PokerCard _pokerCard_5 = new PokerCard(11, Color.diamonds, poker);
    PokerCardGroup tmpGroup = new PokerCardGroup(poker, _pokerCard, _pokerCard_1, _pokerCard_2, _pokerCard_3, _pokerCard_4, _pokerCard_5);
    主点 _主点 = new 主点();
    List<Pair<PokerPattern, PokerCardGroup>> _match = _主点.match(tmpGroup);
    int _size = _match.size();
    InputOutput.<Integer>println(Integer.valueOf(_size));
    主点对 _主点对 = new 主点对();
    List<Pair<PokerPattern, PokerCardGroup>> _match_1 = _主点对.match(tmpGroup);
    int _size_1 = _match_1.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_1));
    副主点 _副主点 = new 副主点();
    List<Pair<PokerPattern, PokerCardGroup>> _match_2 = _副主点.match(tmpGroup);
    int _size_2 = _match_2.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_2));
    副主点对 _副主点对 = new 副主点对();
    List<Pair<PokerPattern, PokerCardGroup>> _match_3 = _副主点对.match(tmpGroup);
    int _size_3 = _match_3.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_3));
    主 _主 = new 主();
    List<Pair<PokerPattern, PokerCardGroup>> _match_4 = _主.match(tmpGroup);
    int _size_4 = _match_4.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_4));
    主对 _主对 = new 主对();
    List<Pair<PokerPattern, PokerCardGroup>> _match_5 = _主对.match(tmpGroup);
    int _size_5 = _match_5.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_5));
    主拖拉机 _主拖拉机 = new 主拖拉机();
    List<Pair<PokerPattern, PokerCardGroup>> _match_6 = _主拖拉机.match(tmpGroup);
    int _size_6 = _match_6.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_6));
    副 _副 = new 副();
    List<Pair<PokerPattern, PokerCardGroup>> _match_7 = _副.match(tmpGroup);
    int _size_7 = _match_7.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_7));
    副对 _副对 = new 副对();
    List<Pair<PokerPattern, PokerCardGroup>> _match_8 = _副对.match(tmpGroup);
    int _size_8 = _match_8.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_8));
    副拖拉机 _副拖拉机 = new 副拖拉机();
    List<Pair<PokerPattern, PokerCardGroup>> _match_9 = _副拖拉机.match(tmpGroup);
    int _size_9 = _match_9.size();
    InputOutput.<Integer>println(Integer.valueOf(_size_9));
  }
}
